SocketCore.Port Property

Syntax

Port as Integer


The port to bind on or connect to. On Mac OS X and Linux, attempting to bind to a port less than 1024 causes a SocketCore.Error event to fire with an error number 107 unless the application is running with root permissions.

This is due a security feature built into the underlying Unix-based OS.

Setting Port to zero will allow the underlying network layer to determine a random port for you when you call the Connect method or, in the case of the TCPSocket, the Listen method.